const Controller = require('egg').Controller;

class MenuController extends Controller {
  async index() {
    const { ctx, app } = this;
    const { menus } = await ctx.service.menu.index();
    ctx.body = {
        code: 0,
        message: 'success',
        data: {
            menus,
        },
      };
  }
}

module.exports = MenuController;